'use strict';

module.exports = app => {
    class CollectController extends app.Controller {

        //设置收藏
        async setcollect() {
            const params = this.ctx.request.body;
            const post = await this.service.collect.setCollect(params);
            this.app.logger.info(post);
            this.app.logger.info("-----------------------");
            this.success(post.message);
        }

        //取消收藏
        async delcollect(){
            const params = this.ctx.request.body;
            const post = await this.service.collect.delCollect(params);
            this.success();
        }
    }
    return CollectController;
};

